import httpRequest from "@/axios/index.js"


/**
 * 添加
 */
export function addReq(data) {
    return httpRequest({
        url: "/sys/user/add",
        method: "post",
        data: data
    })
}

/**
 * 修改
 */
export function updateReq(data) {
    return httpRequest({
        url: "/sys/user/update",
        method: "put",
        data: data
    })
}

/**
 * 删除
 */
export function deleteReq(ids) {
    return httpRequest({
        url: "/sys/user/delete",
        method: "post",
        data: ids
    })
}

/**
 * 查询
 */
export function querySelectiveReq(pageNum, pageSize, data) {
    return httpRequest({
        url: "/sys/user/list?pageNum=" + pageNum + "&pageSize=" + pageSize,
        method: "post",
        data: data
    })
}

/**
 * 重置密码
 */
export function resetPasswordReq(userId) {
    return httpRequest({
        url: "/sys/user/resetPassword/" + userId,
        method: "get"
    })
}

/**
 * 
 * @returns 查询所有用户信息
 */
export function querySysUserAllReq() {
    return httpRequest({
        url: "/sys/user/query/all",
        method: "get"
    })
}